import { get } from '@/api/region/allData'

const city = {
  state: {
    all: []
  },
  mutations: {
    SET_CITY: (state, data) => {
      state.all = data
    }
  },
  actions: {
    getAllCityData({ commit }) {
      get().then(res => {
        commit('SET_CITY', res.data)
      })
    }
  }
}

export default city
